package com.common.utils;

import org.springframework.context.ApplicationContext;

/**
 * spring对象
 * 
 * @author Administrator
 * 
 */
public class SpringUtil {
	private static ApplicationContext context;

	public static void setContext(ApplicationContext _context) {
		context = _context;
	}

	public static Object getBean(String beanName) {		
		if (context != null) {
			return context.getBean(beanName);
		} else {
			return null;
		}
	}
}
